wayland: Add a dummy implementation of gdk_drag_context_set_hotspot
authorMatthias Clasen <mclasen@redhat.com>
Tue, 8 Dec 2015 02:53:38 +0000 (21:53 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 8 Dec 2015 02:53:38 +0000 (21:53 -0500)
This just records the hotspot coordinates. Still to do:
apply the hotspot when updating the drag window.

gdk/wayland/gdkdnd-wayland.c

index 0ee59ab5ba5c6b09599996262fbf58f8270ad48d..f20a0e7ab07a7b5b6927f704ddcec1fd95719fc6 100644 (file)
@@ -48,6 +48,8 @@ struct _GdkWaylandDragContext
   uint32_t serial;
   gdouble x;
   gdouble y;
+  gint hot_x;
+  gint hot_y;
 };
 
 struct _GdkWaylandDragContextClass
@@ -299,6 +301,15 @@ gdk_wayland_drag_context_get_drag_window (GdkDragContext *context)
   return GDK_WAYLAND_DRAG_CONTEXT (context)->dnd_window;
 }
 
+static void
+gdk_wayland_drag_context_set_hotspot (GdkDragContext *context,
+                                      gint            hot_x,
+                                      gint            hot_y)
+{
+  GDK_WAYLAND_DRAG_CONTEXT (context)->hot_x = hot_x;
+  GDK_WAYLAND_DRAG_CONTEXT (context)->hot_y = hot_y;
+}
+
 static void
 gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass)
 {
@@ -317,6 +328,7 @@ gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass)
   context_class->drop_status = gdk_wayland_drag_context_drop_status;
   context_class->get_selection = gdk_wayland_drag_context_get_selection;
   context_class->get_drag_window = gdk_wayland_drag_context_get_drag_window;
+  context_class->set_hotspot = gdk_wayland_drag_context_set_hotspot;
 }
 
 GdkDragProtocol